package com.boot.dao;

import com.boot.entity.User;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * Created by Wuxiang on 2017/7/21.
 */
@Mapper
public interface UserMapper {
    @Delete("delete from user_boot")
    void deleteAll();

    @Select("SELECT * FROM user_boot WHERE name = #{name}")
    List<User> findByName(@Param("name") String name);

    @Insert("INSERT INTO user_boot(name, age) VALUES(#{name}, #{age})")
    int insert(@Param("name") String name, @Param("age") Integer age);
}
